package jman.teemwork15;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

public class TRDao {
	public List<TransferRecord> getTRListById(String id) throws SQLException{
		List<TransferRecord> tRList=new ArrayList<TransferRecord>();
		String sql="select * from transferrecords where idfrom='"+id+"'";
		Dao d=new Dao();
		d.start();
		ResultSet rs=d.read(sql);
		while(rs.next()){
			TransferRecord tr=new TransferRecord(rs.getString(1),rs.getString(2),rs.getInt(3),rs.getString(4));
			tRList.add(tr);
		}
		d.close();
		return tRList;
	}
}
